400
|
How can I change the password character
![](images/exgridq400.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Edit")).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
com_Editor.Option(18/*exEditPassword*/,COMVariant::createFromBoolean(true));
com_Editor.Option(19/*exEditPasswordChar*/,COMVariant::createFromInt(45));
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem(COMVariant::createFromInt(0));
com_Items.AddItem(COMVariant::createFromInt(1));
com_Items.AddItem(COMVariant::createFromInt(2));
}
|
399
|
How can I add a password field
![](images/exgridq399.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Edit")).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
com_Editor.Option(18/*exEditPassword*/,COMVariant::createFromBoolean(true));
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem(COMVariant::createFromInt(0));
com_Items.AddItem(COMVariant::createFromInt(1));
com_Items.AddItem(COMVariant::createFromInt(2));
}
|
398
|
How can I align the text to the right, in my edit control
![](images/exgridq398.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Edit")).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
com_Editor.Option(10/*exEditRight*/,COMVariant::createFromBoolean(true));
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem(COMVariant::createFromInt(0));
com_Items.AddItem(COMVariant::createFromInt(1));
com_Items.AddItem(COMVariant::createFromInt(2));
}
|
397
|
How can I add a simple edit or text box to my column
![](images/exgridq397.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Edit"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem(COMVariant::createFromInt(0));
com_Items.AddItem(COMVariant::createFromInt(1));
com_Items.AddItem(COMVariant::createFromInt(2));
}
|
396
|
How can I change the type of the editor
![](images/exgridq396.png)
public void init()
{
COM com_Column,com_Editor,com_Items;
anytype var_Column,var_Editor,var_Items;
;
super();
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Edit"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem(COMVariant::createFromInt(0));
com_Items.AddItem(COMVariant::createFromInt(1));
com_Items.AddItem(COMVariant::createFromInt(2));
var_Column = COM::createFromObject(exgrid1.Columns()).Item("Edit"); com_Column = var_Column;
var_Editor = COM::createFromObject(com_Column).Editor(); com_Editor = var_Editor;
com_Editor.EditType(4/*SpinType*/);
}
|
395
|
How can I add a border arround the editor
![](images/exgridq395.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Edit")).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
com_Editor.Appearance(1/*FlatApp*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Edit");
com_Items.AddItem("Edit");
com_Items.AddItem("Edit");
}
|
394
|
How do I assign an editor for the entire column
![](images/exgridq394.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Edit"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Edit");
com_Items.AddItem("Edit");
com_Items.AddItem("Edit");
}
|
393
|
How do I check if a cell has an editor assigned
![](images/exgridq393.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
var_Editor = COM::createFromObject(com_Items.CellEditor(com_Items.AddItem("Edit -> ReadOnly "),COMVariant::createFromInt(0))); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
com_Items.AddItem("ReadOnly");
com_Items.AddItem("ReadOnly");
com_Items.AddItem(com_Items.HasCellEditor(com_Items.FocusItem(),COMVariant::createFromInt(0)));
}
|
392
|
How do I delete or remove the editor for a sppecified cell
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
var_Editor = COM::createFromObject(com_Items.CellEditor(com_Items.AddItem("Edit -> ReadOnly "),COMVariant::createFromInt(0))); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
com_Items.AddItem("ReadOnly");
com_Items.AddItem("ReadOnly");
com_Items.DeleteCellEditor(com_Items.FocusItem(),COMVariant::createFromInt(0));
}
|
391
|
How do I hide or disable the editor assigned to a single cell
![](images/exgridq391.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Column"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Edit");
com_Items.CellEditorVisible(com_Items.AddItem("ReadOnly"),COMVariant::createFromInt(0),false);
com_Items.AddItem("Edit");
}
|
390
|
How do I assign or change the editor for a particular cell
![](images/exgridq390.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("ReadOnly");
var_Editor = COM::createFromObject(com_Items.CellEditor(com_Items.AddItem("Edit"),COMVariant::createFromInt(0))); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
com_Items.AddItem("ReadOnly");
}
|
389
|
How do I get the caption of the cell as it is displayed on the control
![](images/exgridq389.png)
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
int h;
;
super();
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem(COMVariant::createFromInt(3));
var_Editor = com_Items.CellEditor(h,COMVariant::createFromInt(0)); com_Editor = var_Editor;
com_Editor.EditType(6/*CheckListType*/);
com_Editor.AddItem(1,"One");
com_Editor.AddItem(2,"Two");
com_Items.AddItem(COMVariant::createFromStr(com_Items.CellCaption(h,COMVariant::createFromInt(0))));
com_Items.AddItem(com_Items.CellValue(h,COMVariant::createFromInt(0)));
}
|
388
|
Shift + Ctrl + Alt + Insert sequence copies the control's content to the clipboard, in template or x-script form
public void init()
{
COM com_Items;
anytype var_Items;
;
super();
exgrid1.AllowCopyTemplate(true);
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Item 3");
com_Items.AddItem("Item 1");
com_Items.AddItem("Item 2");
}
|
387
|
I've seen your template feature, is there any method to generate this x-script format
![](images/exgridq387.png)
public void init()
{
COM com_Items,com_Items1;
anytype var_Items,var_Items1;
;
super();
exgrid1.ScrollBySingleLine(true);
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Item 3");
com_Items.AddItem("Item 1");
com_Items.AddItem("Item 2");
var_Items1 = exgrid1.Items(); com_Items1 = var_Items1;
com_Items1.CellSingleLine(com_Items1.AddItem(COMVariant::createFromStr(exgrid1.ToTemplate())),COMVariant::createFromInt(0),false);
}
|
386
|
How do I prevent scrolling the control's data after user does the sort
![](images/exgridq386.png)
public void init()
{
COM com_Column,com_Items;
anytype var_Column,var_Items;
;
super();
exgrid1.EnsureOnSort(false);
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Item 3");
com_Items.AddItem("Item 1");
com_Items.AddItem("Item 2");
exgrid1.PutItems(exgrid1.GetItems(COMVariant::createFromInt(0)));
exgrid1.PutItems(exgrid1.GetItems(COMVariant::createFromInt(0)));
exgrid1.PutItems(exgrid1.GetItems(COMVariant::createFromInt(0)));
var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column;
com_Column.SortOrder(1/*SortAscending*/);
}
|
385
|
How do I ensure that the focused item is visible, after the user does the sort
![](images/exgridq385.png)
public void init()
{
COM com_Column,com_Items;
anytype var_Column,var_Items;
;
super();
exgrid1.EnsureOnSort(true);
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Item 3");
com_Items.AddItem("Item 1");
com_Items.AddItem("Item 2");
var_Column = COM::createFromObject(exgrid1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column;
com_Column.SortOrder(1/*SortAscending*/);
}
|
384
|
How can I disable selecting multiple items by dragging
public void init()
{
;
super();
exgrid1.SelectByDrag(false);
exgrid1.SingleSel(true);
}
|
383
|
Is there any function to change the default value for options of the editors
![](images/exgridq383.png)
public void init()
{
COM com_Editor,com_Items,com_Items1;
anytype var_Editor,var_Items,var_Items1;
;
super();
exgrid1.DefaultEditorOption(18/*exEditPassword*/,COMVariant::createFromBoolean(true));
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Pass1"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Pass2"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(2));
var_Items1 = exgrid1.Items(); com_Items1 = var_Items1;
com_Items1.CellValue(com_Items1.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(2));
}
|
382
|
How do I close the editor, or stop editing a cell
public void init()
{
;
super();
exgrid1.EditClose();
}
|
381
|
Is there any function to highlight or mark the cells that have a tooltip using my picture or icon
![](images/exgridq381.png)
public void init()
{
COM com_Items,com_Items1;
anytype var_Items,var_Items1;
str var_s;
;
super();
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.MarkTooltipCells(true);
exgrid1.MarkTooltipCellsImage(1);
exgrid1.Columns().Add("");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellToolTip(com_Items.AddItem("This is a cell with a tooltip"),COMVariant::createFromInt(0),"This is a bit of text that is shown when the cursor hovers the cell.");
var_Items1 = exgrid1.Items(); com_Items1 = var_Items1;
com_Items1.CellToolTip(com_Items1.AddItem("This is a cell without a tooltip"),COMVariant::createFromInt(0),"");
}
|
380
|
Is there any function to highlight or mark the cells that have a tooltip
![](images/exgridq380.png)
public void init()
{
COM com_Items,com_Items1;
anytype var_Items,var_Items1;
;
super();
exgrid1.MarkTooltipCells(true);
exgrid1.TooltipCellsColor(WinApi::RGB2int(255,0,0));
exgrid1.Columns().Add("");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellToolTip(com_Items.AddItem("This is a cell with a tooltip"),COMVariant::createFromInt(0),"This is a bit of text that is shown when the cursor hovers the cell.");
var_Items1 = exgrid1.Items(); com_Items1 = var_Items1;
com_Items1.CellToolTip(com_Items1.AddItem("This is a cell without a tooltip"),COMVariant::createFromInt(0),"");
}
|
379
|
Is there any function to highlight or mark the cells that have a tooltip
![](images/exgridq379.png)
public void init()
{
COM com_Items,com_Items1;
anytype var_Items,var_Items1;
;
super();
exgrid1.MarkTooltipCells(true);
exgrid1.Columns().Add("");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellToolTip(com_Items.AddItem("This is a cell with a tooltip"),COMVariant::createFromInt(0),"This is a bit of text that is shown when the cursor hovers the cell.");
var_Items1 = exgrid1.Items(); com_Items1 = var_Items1;
com_Items1.CellToolTip(com_Items1.AddItem("This is a cell without a tooltip"),COMVariant::createFromInt(0),"");
}
|
378
|
How do I find the window's handled when an editor is running
public void init()
{
int var_Editing;
;
super();
var_Editing = exgrid1.Editing();
}
|
377
|
How can I start editing the cell
public void init()
{
;
super();
exgrid1.AutoEdit(false);
exgrid1.Edit();
}
|
376
|
Is there any option to edit the control's data manually, so the editor doesn't show up as soon as the cell is focused
// Click event - Occurs when the user presses and then releases the left mouse button over the grid control.
void onEvent_Click()
{
;
exgrid1.Edit();
}
public void init()
{
COM com_Editor,com_Items;
anytype var_Editor,var_Items;
;
super();
exgrid1.BeginUpdate();
exgrid1.AutoEdit(false);
exgrid1.MarkSearchColumn(false);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Edit1"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Edit2"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(2));
com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(3)),COMVariant::createFromInt(1),COMVariant::createFromInt(4));
exgrid1.EndUpdate();
}
|
375
|
How can change the background color for selected editor
![](images/exgridq375.png)
public void init()
{
COM com_Editor;
anytype var_Editor;
;
super();
exgrid1.Background(17/*exSelectInPlace*/,WinApi::RGB2int(255,0,0));
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Editor"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(3/*DropDownListType*/);
exgrid1.Items().AddItem(COMVariant::createFromInt(20));
}
|
374
|
How can change the visual appearance for the spin control, using your EBN files
![](images/exgridq374.png)
public void init()
{
COM com_Editor;
anytype var_Editor;
;
super();
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.VisualAppearance().Add(2,"c:\\exontrol\\images\\pushed.ebn");
exgrid1.Background(22/*exSpinUpButtonUp*/,0x1000000);
exgrid1.Background(23/*exSpinUpButtonDown*/,0x2000000);
exgrid1.Background(24/*exSpinDownButtonUp*/,0x1000000);
exgrid1.Background(25/*exSpinDownButtonDown*/,0x2000000);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Editor"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(4/*SpinType*/);
exgrid1.Items().AddItem(COMVariant::createFromInt(20));
}
|
373
|
How can change the visual appearance for the slider or track bar, using your EBN files
![](images/exgridq373.png)
public void init()
{
COM com_Editor;
anytype var_Editor;
;
super();
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.Background(16/*exSliderThumb*/,0x1000000);
exgrid1.Background(15/*exSliderRange*/,WinApi::RGB2int(210,210,210));
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Editor"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(20/*SliderType*/);
exgrid1.Items().AddItem(COMVariant::createFromInt(20));
}
|
372
|
How can change the visual appearance for the button that are visible inside the editors, using your EBN files
![](images/exgridq372.png)
public void init()
{
COM com_Editor;
anytype var_Editor;
;
super();
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.VisualAppearance().Add(2,"c:\\exontrol\\images\\pushed.ebn");
exgrid1.Background(7/*exButtonDown*/,0x1000000);
exgrid1.Background(6/*exButtonUp*/,0x2000000);
var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Editor")).Editor(); com_Editor = var_Editor;
com_Editor.EditType(7/*DateType*/);
com_Editor.AddButton(COMVariant::createFromInt(1));
exgrid1.Items().AddItem("1/1/2002");
}
|
371
|
How can change the visual appearance for the button that shows the drop down editors, using your EBN files
![](images/exgridq371.png)
public void init()
{
COM com_Editor;
anytype var_Editor;
;
super();
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.VisualAppearance().Add(2,"c:\\exontrol\\images\\pushed.ebn");
exgrid1.Background(4/*exDropDownButtonUp*/,0x1000000);
exgrid1.Background(5/*exDropDownButtonDown*/,0x2000000);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Editor"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(7/*DateType*/);
exgrid1.Items().AddItem("1/1/2002");
}
|
370
|
How can I find the column that gets the focus
public void init()
{
COM com_Editor,com_Items,com_Items1,com_Items2;
anytype var_Editor,var_Items,var_Items1,var_Items2;
;
super();
exgrid1.MarkSearchColumn(false);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Edit1"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Edit2"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(1/*EditType*/);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(2));
var_Items1 = exgrid1.Items(); com_Items1 = var_Items1;
com_Items1.CellValue(com_Items1.AddItem(COMVariant::createFromInt(3)),COMVariant::createFromInt(1),COMVariant::createFromInt(4));
var_Items2 = exgrid1.Items(); com_Items2 = var_Items2;
com_Items2.ItemDivider(com_Items2.AddItem(exgrid1.FocusColumnIndex()),0);
}
|
369
|
How do I make the control read-only, but still can see the values in a drop down list
![](images/exgridq369.png)
public void init()
{
COM com_Editor;
anytype var_Editor;
;
super();
exgrid1.DrawGridLines(-1/*exAllLines*/);
exgrid1.ReadOnly(1/*exLocked*/);
var_Editor = COM::createFromObject(COM::createFromVariant(exgrid1.Columns().Add("Editor"))).Editor(); com_Editor = var_Editor;
com_Editor.EditType(7/*DateType*/);
exgrid1.Items().AddItem("1/1/2003");
}
|
368
|
How do I make the control read-only (method 1)
public void init()
{
COM com_Column,com_Editor,com_Editor1,com_Items;
anytype var_Column,var_Editor,var_Editor1,var_Items;
;
super();
exgrid1.BeginUpdate();
exgrid1.ReadOnly(-1/*exReadOnly*/);
var_Editor = COM::createFromVariant(exgrid1.Columns().Add("Editor")).Editor(); com_Editor = var_Editor;
com_Editor.EditType(6/*CheckListType*/);
com_Editor.AddItem(1,"One");
com_Editor.AddItem(2,"Two");
var_Column = COM::createFromVariant(exgrid1.Columns().Add("Check")); com_Column = var_Column;
var_Editor1 = com_Column.Editor(); com_Editor1 = var_Editor1;
com_Editor1.EditType(19/*CheckValueType*/);
com_Editor1.Option(16/*exCheckValue1*/,COMVariant::createFromInt(2));
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(0));
com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(1),COMVariant::createFromInt(1));
exgrid1.EndUpdate();
}
|
367
|
How do I change the control's border, using your EBN files
![](images/exgridq367.png)
public void init()
{
;
super();
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.Appearance(16777216);
}
|
366
|
Can I change the default border of the tooltip, using your EBN files
![](images/exgridq366.png)
public void init()
{
;
super();
exgrid1.ToolTipDelay(1);
exgrid1.ToolTipWidth(364);
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.Background(64/*exToolTipAppearance*/,0x1000000);
COM::createFromVariant(exgrid1.Columns().Add("tootip")).ToolTip("this is a tooltip assigned to a column");
}
|
365
|
Can I change the background color for the tooltip
![](images/exgridq365.png)
public void init()
{
;
super();
exgrid1.ToolTipDelay(1);
exgrid1.ToolTipWidth(364);
exgrid1.Background(65/*exToolTipBackColor*/,WinApi::RGB2int(255,0,0));
COM::createFromVariant(exgrid1.Columns().Add("tootip")).ToolTip("this is a tooltip assigned to a column");
}
|
364
|
Does the tooltip support HTML format
![](images/exgridq364.png)
public void init()
{
;
super();
exgrid1.ToolTipDelay(1);
exgrid1.ToolTipWidth(364);
COM::createFromVariant(exgrid1.Columns().Add("tootip")).ToolTip("<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>");
}
|
363
|
Can I change the forecolor for the tooltip
![](images/exgridq363.png)
public void init()
{
;
super();
exgrid1.ToolTipDelay(1);
exgrid1.ToolTipWidth(364);
exgrid1.Background(66/*exToolTipForeColor*/,WinApi::RGB2int(255,0,0));
COM::createFromVariant(exgrid1.Columns().Add("tootip")).ToolTip("this is a tooltip assigned to a column");
}
|
362
|
Can I change the foreground color for the tooltip
![](images/exgridq362.png)
public void init()
{
;
super();
exgrid1.ToolTipDelay(1);
exgrid1.ToolTipWidth(364);
COM::createFromVariant(exgrid1.Columns().Add("tootip")).ToolTip("<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>");
}
|
361
|
How can I merge cells
![](images/exgridq361.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.DrawGridLines(-1/*exAllLines*/);
exgrid1.MarkSearchColumn(false);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
exgrid1.Columns().Add("C3");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("this cell merges the first two columns");
com_Items.CellMerge(h,COMVariant::createFromInt(0),COMVariant::createFromInt(1));
h = com_Items.AddItem();
com_Items.CellValue(h,COMVariant::createFromInt(1),"this cell merges the last two columns");
com_Items.CellMerge(h,COMVariant::createFromInt(1),COMVariant::createFromInt(2));
h = com_Items.AddItem("this cell merges the all three columns");
com_Items.CellMerge(h,COMVariant::createFromInt(0),COMVariant::createFromInt(1));
com_Items.CellMerge(h,COMVariant::createFromInt(0),COMVariant::createFromInt(2));
h = com_Items.AddItem("this draws a divider item");
com_Items.ItemDivider(h,0);
}
|
360
|
How can I merge cells
![](images/exgridq360.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.TreeColumnIndex(-1);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
h = com_Items.AddItem("This is bit of text merges all cells in the item");
com_Items.ItemDivider(h,0);
com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
}
|
359
|
How can I specify the width for a splited cell
![](images/exgridq359.png)
public void init()
{
COM com_Items;
COMVariant s,s1;
anytype var_Items;
int h;
;
super();
exgrid1.DrawGridLines(-2/*exRowLines*/);
exgrid1.Columns().Add("Single Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Split 1");
s = com_Items.SplitCell(h,COMVariant::createFromInt(0));
com_Items.CellWidth(,s,64);
com_Items.CellValue(,s,"Split 2");
s1 = com_Items.SplitCell(,s);
com_Items.CellValue(,s1,"Split 3");
com_Items.CellWidth(,s1,64);
}
|
358
|
How can I split a cell in three parts
![](images/exgridq358.png)
public void init()
{
COM com_Items;
COMVariant s,s1;
anytype var_Items;
int h;
;
super();
exgrid1.DrawGridLines(-2/*exRowLines*/);
exgrid1.Columns().Add("Single Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Split 1");
s = com_Items.SplitCell(h,COMVariant::createFromInt(0));
com_Items.CellValue(,s,"Split 2");
s1 = com_Items.SplitCell(,s);
com_Items.CellValue(,s1,"Split 3");
}
|
357
|
How can I add a button aligned to right
![](images/exgridq357.png)
public void init()
{
COM com_Items;
COMVariant s;
anytype var_Items;
str var_s;
;
super();
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.Columns().Add("Single Column");
exgrid1.ShowFocusRect(false);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.ItemDivider(com_Items.AddItem("This is a bit of text being displayed on the entire item"),0);
s = com_Items.SplitCell(com_Items.AddItem("Split Cell 1.1"),COMVariant::createFromInt(0));
com_Items.CellValue(,s,"Split Cell <img>1</img>");
com_Items.CellValueFormat(,s,1/*exHTML*/);
com_Items.CellHAlignment(,s,1/*CenterAlignment*/);
com_Items.CellHasButton(,s,16777216);
com_Items.CellWidth(,s,84);
}
|
356
|
How can I split a cell
![](images/exgridq356.png)
public void init()
{
COM com_Items;
COMVariant s;
anytype var_Items;
str var_s;
;
super();
exgrid1.DrawGridLines(-2/*exRowLines*/);
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.Columns().Add("Single Column");
exgrid1.ShowFocusRect(false);
var_Items = exgrid1.Items(); com_Items = var_Items;
s = com_Items.SplitCell(com_Items.AddItem("Split Cell 1.1"),COMVariant::createFromInt(0));
com_Items.CellValue(,s,"Split Cell <img>1</img>");
com_Items.CellValueFormat(,s,1/*exHTML*/);
com_Items.CellHAlignment(,s,1/*CenterAlignment*/);
com_Items.CellBackColor(,s,0x1000000);
com_Items.CellWidth(,s,84);
}
|
355
|
Can I select an item giving its general position
![](images/exgridq355.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.SelectPos(COMVariant::createFromInt(1));
}
|
354
|
How can I change the color for separator / dividers items
![](images/exgridq354.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.GridLineColor(WinApi::RGB2int(255,0,0));
exgrid1.MarkSearchColumn(false);
exgrid1.TreeColumnIndex(-1);
exgrid1.ScrollBySingleLine(false);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
h = com_Items.AddItem();
com_Items.ItemDivider(h,0);
com_Items.ItemDividerLine(h,4/*DoubleDotLine*/);
com_Items.ItemDividerLineAlignment(h,1/*DividerCenter*/);
com_Items.ItemHeight(h,6);
com_Items.SelectableItem(h,false);
h = com_Items.AddItem("Cell 2");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
}
|
353
|
How can I add separator - dividers items
![](images/exgridq353.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.TreeColumnIndex(-1);
exgrid1.ScrollBySingleLine(false);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
h = com_Items.AddItem();
com_Items.ItemDivider(h,0);
com_Items.ItemDividerLine(h,4/*DoubleDotLine*/);
com_Items.ItemDividerLineAlignment(h,1/*DividerCenter*/);
com_Items.ItemHeight(h,6);
com_Items.SelectableItem(h,false);
h = com_Items.AddItem("Cell 2");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
}
|
352
|
Can I change the style of the line being displayed by a divider item
![](images/exgridq352.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.TreeColumnIndex(-1);
exgrid1.ScrollBySingleLine(false);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
h = com_Items.AddItem("This is bit of text that's displayed on the entire item, divider.");
com_Items.ItemDivider(h,0);
com_Items.ItemDividerLine(h,4/*DoubleDotLine*/);
com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
com_Items.ItemHeight(h,24);
}
|
351
|
Can I remove the line being displayed by a divider item
![](images/exgridq351.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.TreeColumnIndex(-1);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
h = com_Items.AddItem("This is bit of text that's displayed on the entire item, divider.");
com_Items.ItemDivider(h,0);
com_Items.ItemDividerLine(h,0/*EmptyLine*/);
com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
}
|
350
|
How can I display a divider item, merging all cells
![](images/exgridq350.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.TreeColumnIndex(-1);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
h = com_Items.AddItem("This is bit of text that's displayed on the entire item, divider.");
com_Items.ItemDivider(h,0);
com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
}
|
349
|
How can I fix or lock items
![](images/exgridq349.png)
public void init()
{
COM com_Items;
anytype var_Items;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.LockedItemCount(0/*exTop*/,1);
com_Items.CellValue(com_Items.LockedItem(0/*exTop*/,0),COMVariant::createFromInt(0),"This is a locked item, fixed to the top side of the control.");
com_Items.ItemBackColor(com_Items.LockedItem(0/*exTop*/,0),WinApi::RGB2int(196,196,186));
com_Items.LockedItemCount(2/*exBottom*/,2);
com_Items.CellValue(com_Items.LockedItem(2/*exBottom*/,0),COMVariant::createFromInt(0),"This is a locked item, fixed to the top side of the control.");
com_Items.ItemBackColor(com_Items.LockedItem(2/*exBottom*/,0),WinApi::RGB2int(196,196,186));
com_Items.CellValue(com_Items.LockedItem(2/*exBottom*/,1),COMVariant::createFromInt(0),"This is a locked item, fixed to the top side of the control.");
com_Items.ItemBackColor(com_Items.LockedItem(2/*exBottom*/,1),WinApi::RGB2int(186,186,186));
}
|
348
|
How can I fix or lock an item on the bottom side of the control
![](images/exgridq348.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.LockedItemCount(2/*exBottom*/,1);
com_Items.CellValue(com_Items.LockedItem(2/*exBottom*/,0),COMVariant::createFromInt(0),"This is a locked item, fixed to the bottom side of the control.");
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
}
|
347
|
How can I fix or lock an item on the top of the control
![](images/exgridq347.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.LockedItemCount(0/*exTop*/,1);
com_Items.CellValue(com_Items.LockedItem(0/*exTop*/,0),COMVariant::createFromInt(0),"This is a locked item, fixed to the top side of the control.");
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
}
|
346
|
Is there any function to limit the height of the items when I display it using multiple lines
![](images/exgridq346.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.ScrollBySingleLine(true);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
com_Items.ItemMaxHeight(h,48);
}
|
345
|
Why I cannot center my cells in the column
![](images/exgridq345.png)
public void init()
{
;
super();
exgrid1.TreeColumnIndex(-1);
exgrid1.DrawGridLines(-2/*exRowLines*/);
COM::createFromVariant(exgrid1.Columns().Add("Default")).Alignment(1/*CenterAlignment*/);
exgrid1.Items().AddItem("item 1");
exgrid1.Items().AddItem("item 2");
exgrid1.Items().AddItem("item 3");
}
|
344
|
How can I align the cell to the left, center or to the right
![](images/exgridq344.png)
public void init()
{
COM com_Items;
anytype var_Items;
;
super();
exgrid1.TreeColumnIndex(-1);
exgrid1.DrawGridLines(-2/*exRowLines*/);
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellHAlignment(com_Items.AddItem("left"),COMVariant::createFromInt(0),0/*LeftAlignment*/);
com_Items.CellHAlignment(com_Items.AddItem("center"),COMVariant::createFromInt(0),1/*CenterAlignment*/);
com_Items.CellHAlignment(com_Items.AddItem("right"),COMVariant::createFromInt(0),2/*RightAlignment*/);
}
|
343
|
How do I apply HTML format to a cell
![](images/exgridq343.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
str var_s,var_s1;
;
super();
exgrid1.TreeColumnIndex(-1);
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.HTMLPicture("p1","c:\\exontrol\\images\\zipdisk.gif");
exgrid1.HTMLPicture("p2","c:\\exontrol\\images\\auction.gif");
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("The following item shows some of the HTML format supported:");
com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/);
var_s1 = "<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>text <b>bold</b>, <i>italic</i>, <u";
var_s1 = var_s1 + ">underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor";
var_s1 = var_s1 + "</fgcolor> or <bgcolor=00FF00>bgcolor</bgcolor> ";
h = com_Items.AddItem(COMVariant::createFromStr(var_s1));
com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/);
com_Items.CellSingleLine(h,COMVariant::createFromInt(0),false);
}
|
342
|
How can I change the font for a cell
![](images/exgridq342.png)
public void init()
{
COM com_Items;
anytype var_Items;
;
super();
exgrid1.Columns().Add("Default");
exgrid1.Items().AddItem("std font");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellValueFormat(com_Items.AddItem("this <font tahoma;12>is a bit of text with</font> a different font"),COMVariant::createFromInt(0),1/*exHTML*/);
}
|
341
|
How can I change the font for a cell
![](images/exgridq341.png)
public void init()
{
COM com_Items,com_f;
anytype f,var_Items;
;
super();
exgrid1.Columns().Add("Default");
exgrid1.Items().AddItem("default font");
f = COM::createFromObject(new stdole.StdFont()); com_f = f;
f.Name("Tahoma");
f.Size(12);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellFont(com_Items.AddItem("new font"),COMVariant::createFromInt(0),f);
}
|
340
|
How can I change the font for entire item
![](images/exgridq340.png)
public void init()
{
COM com_Items,com_f;
anytype f,var_Items;
;
super();
exgrid1.Columns().Add("Default");
exgrid1.Items().AddItem("default font");
f = COM::createFromObject(new stdole.StdFont()); com_f = f;
f.Name("Tahoma");
f.Size(12);
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.ItemFont(com_Items.AddItem("new font"),f);
}
|
339
|
How do I vertically align a cell
![](images/exgridq339.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.DrawGridLines(-2/*exRowLines*/);
COM::createFromVariant(exgrid1.Columns().Add("MultipleLine")).Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false));
exgrid1.Columns().Add("VAlign");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("This is a bit of long text that should break the line");
com_Items.CellValue(h,COMVariant::createFromInt(1),"top");
com_Items.CellVAlignment(h,COMVariant::createFromInt(1),0/*exTop*/);
h = com_Items.AddItem("This is a bit of long text that should break the line");
com_Items.CellValue(h,COMVariant::createFromInt(1),"middle");
com_Items.CellVAlignment(h,COMVariant::createFromInt(1),1/*exMiddle*/);
h = com_Items.AddItem("This is a bit of long text that should break the line");
com_Items.CellValue(h,COMVariant::createFromInt(1),"bottom");
com_Items.CellVAlignment(h,COMVariant::createFromInt(1),2/*exBottom*/);
}
|
338
|
How can I change the position of an item
![](images/exgridq338.png)
public void init()
{
COM com_Items;
anytype var_Items;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.AddItem("Item 1");
com_Items.AddItem("Item 2");
com_Items.ItemPosition(com_Items.AddItem("Item 3"),0);
}
|
337
|
How do I find an item based on a path
![](images/exgridq337.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.ItemData(com_Items.InsertItem(h,,"Child 2"),COMVariant::createFromInt(1234));
com_Items.ExpandItem(h,true);
com_Items.ItemBold(com_Items.FindPath("Root 1\\Child 1"),true);
}
|
336
|
How do I find an item based on my extra data
![](images/exgridq336.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.ItemData(com_Items.InsertItem(h,,"Child 2"),COMVariant::createFromInt(1234));
com_Items.ExpandItem(h,true);
com_Items.ItemBold(com_Items.FindItemData(COMVariant::createFromInt(1234)),true);
}
|
335
|
How do I find an item
![](images/exgridq335.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.ItemBold(com_Items.FindItem("Child 2",COMVariant::createFromInt(0)),true);
}
|
334
|
How can I insert a hyperlink or an anchor element
![](images/exgridq334.png)
public void init()
{
COM com_Items,com_Items1;
anytype var_Items,var_Items1;
;
super();
exgrid1.Columns().Add("Column");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.CellValueFormat(com_Items.AddItem("Just an <a1>anchor</a> element ..."),COMVariant::createFromInt(0),1/*exHTML*/);
var_Items1 = exgrid1.Items(); com_Items1 = var_Items1;
com_Items1.CellValueFormat(com_Items1.AddItem("Just another <a2>anchor</a> element ..."),COMVariant::createFromInt(0),1/*exHTML*/);
}
|
333
|
How do I find the index of the item based on its handle
![](images/exgridq333.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.ItemBold(com_Items.ItemByIndex(com_Items.ItemToIndex(h)),true);
}
|
332
|
How do I find the handle of the item based on its index
![](images/exgridq332.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.ItemBold(com_Items.ItemByIndex(1),true);
}
|
331
|
How can I find the cell being clicked in a radio group
![](images/exgridq331.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.SelBackColor(WinApi::RGB2int(255,255,128));
exgrid1.SelForeColor(WinApi::RGB2int(0,0,0));
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
exgrid1.Columns().Add("C3");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Radio 1");
com_Items.CellHasRadioButton(h,COMVariant::createFromInt(1),true);
com_Items.CellRadioGroup(h,COMVariant::createFromInt(1),1234);
com_Items.CellValue(h,COMVariant::createFromInt(2),"Radio 2");
com_Items.CellHasRadioButton(h,COMVariant::createFromInt(2),true);
com_Items.CellRadioGroup(h,COMVariant::createFromInt(2),1234);
com_Items.CellState(h,COMVariant::createFromInt(1),1);
com_Items.CellBold(,com_Items.CellChecked(1234),true);
}
|
330
|
Can I add a +/- ( expand / collapse ) buttons to each item, so I can load the child items later
![](images/exgridq330.png)
public void init()
{
COM com_Items;
anytype var_Items;
;
super();
exgrid1.LinesAtRoot(-1/*exLinesAtRoot*/);
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.ItemHasChildren(com_Items.AddItem("parent item with no child items"),true);
com_Items.AddItem("next item");
}
|
329
|
Can I let the user to resize at runtime the specified item
![](images/exgridq329.png)
public void init()
{
COM com_Items;
anytype var_Items;
;
super();
exgrid1.ScrollBySingleLine(true);
exgrid1.DrawGridLines(-2/*exRowLines*/);
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
com_Items.ItemAllowSizing(com_Items.AddItem("resizable item"),true);
com_Items.AddItem("not resizable item");
}
|
328
|
How can I change the size ( width, height ) of the picture
![](images/exgridq328.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.CellPicture(h,COMVariant::createFromInt(0),COM::createFromVariant(exgrid1.ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")));
com_Items.CellPictureWidth(h,COMVariant::createFromInt(0),24);
com_Items.CellPictureHeight(h,COMVariant::createFromInt(0),24);
com_Items.ItemHeight(h,32);
h = com_Items.AddItem("Root 2");
com_Items.CellPicture(h,COMVariant::createFromInt(0),COM::createFromVariant(exgrid1.ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")));
com_Items.ItemHeight(h,48);
}
|
327
|
How can I find the number or the count of selected items
![](images/exgridq327.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.SingleSel(false);
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.SelectItem(com_Items.ItemChild(h),true);
com_Items.SelectItem(com_Items.NextSiblingItem(com_Items.ItemChild(h)),true);
com_Items.AddItem(exgrid1.ExecuteTemplate("Items.SelectCount()"));
}
|
326
|
How do I unselect an item
![](images/exgridq326.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.SelectItem(h,false);
}
|
325
|
How do I find the selected item
![](images/exgridq325.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.SelectItem(h,true);
com_Items.ItemBold(com_Items.SelectedItem(0),true);
}
|
324
|
How do I un select all items
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.SingleSel(false);
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.UnselectAll();
}
|
323
|
How do I select multiple items
![](images/exgridq323.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.SingleSel(false);
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.SelectItem(com_Items.ItemChild(h),true);
com_Items.SelectItem(com_Items.NextSiblingItem(com_Items.ItemChild(h)),true);
}
|
322
|
How do I select all items
![](images/exgridq322.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.SingleSel(false);
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.SelectAll();
}
|
321
|
How do I select an item
![](images/exgridq321.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.SelectItem(h,true);
}
|
320
|
Can I display a button with some picture or icon inside
![](images/exgridq320.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.HTMLPicture("p1","c:\\exontrol\\images\\zipdisk.gif");
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1)," Button <img>p1</img> ");
com_Items.CellValueFormat(h,COMVariant::createFromInt(1),1/*exHTML*/);
com_Items.CellHAlignment(h,COMVariant::createFromInt(1),2/*RightAlignment*/);
com_Items.CellHasButton(h,COMVariant::createFromInt(1),true);
com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true);
com_Items.ItemHeight(h,48);
}
|
319
|
Can I display a button with some picture or icon inside
![](images/exgridq319.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
str var_s;
;
super();
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1)," Button <img>1</img> ");
com_Items.CellValueFormat(h,COMVariant::createFromInt(1),1/*exHTML*/);
com_Items.CellHAlignment(h,COMVariant::createFromInt(1),2/*RightAlignment*/);
com_Items.CellHasButton(h,COMVariant::createFromInt(1),true);
com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true);
}
|
318
|
Can I display a button with some icon inside
![](images/exgridq318.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
str var_s;
;
super();
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1)," <img>1</img> ");
com_Items.CellValueFormat(h,COMVariant::createFromInt(1),1/*exHTML*/);
com_Items.CellHAlignment(h,COMVariant::createFromInt(1),2/*RightAlignment*/);
com_Items.CellHasButton(h,COMVariant::createFromInt(1),true);
com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true);
}
|
317
|
How can I assign multiple icon/picture to a cell
![](images/exgridq317.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.HTMLPicture("p1","c:\\exontrol\\images\\zipdisk.gif");
exgrid1.HTMLPicture("p2","c:\\exontrol\\images\\auction.gif");
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("text <img>p1</img> another picture <img>p2</img> and so on");
com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/);
com_Items.CellPicture(h,COMVariant::createFromInt(0),COM::createFromVariant(exgrid1.ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\colorize.gif`)")));
com_Items.ItemHeight(h,48);
com_Items.AddItem("Root 2");
}
|
316
|
How can I assign an icon/picture to a cell
![](images/exgridq316.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.CellPicture(h,COMVariant::createFromInt(0),COM::createFromVariant(exgrid1.ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")));
com_Items.ItemHeight(h,48);
com_Items.AddItem("Root 2");
}
|
315
|
How can I assign multiple icons/pictures to a cell
![](images/exgridq315.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
str var_s;
;
super();
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root <img>1</img> 1, <img>2</img>, ... and so on ");
com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/);
}
|
314
|
How can I assign multiple icons/pictures to a cell
![](images/exgridq314.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
str var_s;
;
super();
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.CellImages(h,COMVariant::createFromInt(0),"1,2,3");
}
|
313
|
How can I assign an icon/picture to a cell
![](images/exgridq313.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
str var_s;
;
super();
var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql";
var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0";
var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN";
var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=";
exgrid1.Images(COMVariant::createFromStr(var_s));
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.CellImage(h,COMVariant::createFromInt(0),1);
com_Items.CellImage(com_Items.InsertItem(h,,"Child 1"),COMVariant::createFromInt(0),2);
com_Items.CellImage(com_Items.InsertItem(h,,"Child 2"),COMVariant::createFromInt(0),3);
com_Items.ExpandItem(h,true);
}
|
312
|
How can I get the handle of an item based on the handle of the cell
![](images/exgridq312.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("Default");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Root 1");
com_Items.InsertItem(h,,"Child 1");
com_Items.InsertItem(h,,"Child 2");
com_Items.ExpandItem(h,true);
com_Items.ItemBold(com_Items.CellItem(com_Items.ItemCell(h,COMVariant::createFromInt(0))),true);
}
|
311
|
How can I display a button inside the item or cell
![](images/exgridq311.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1)," Button 1 ");
com_Items.CellHAlignment(h,COMVariant::createFromInt(1),2/*RightAlignment*/);
com_Items.CellHasButton(h,COMVariant::createFromInt(1),true);
com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true);
h = com_Items.AddItem("Cell 2");
com_Items.CellValue(h,COMVariant::createFromInt(1)," Button 2 ");
com_Items.CellHAlignment(h,COMVariant::createFromInt(1),1/*CenterAlignment*/);
com_Items.CellHasButton(h,COMVariant::createFromInt(1),true);
}
|
310
|
How can I change the state of a radio button
![](images/exgridq310.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.SelBackColor(WinApi::RGB2int(255,255,128));
exgrid1.SelForeColor(WinApi::RGB2int(0,0,0));
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
exgrid1.Columns().Add("C3");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Radio 1");
com_Items.CellHasRadioButton(h,COMVariant::createFromInt(1),true);
com_Items.CellRadioGroup(h,COMVariant::createFromInt(1),1234);
com_Items.CellValue(h,COMVariant::createFromInt(2),"Radio 2");
com_Items.CellHasRadioButton(h,COMVariant::createFromInt(2),true);
com_Items.CellRadioGroup(h,COMVariant::createFromInt(2),1234);
com_Items.CellState(h,COMVariant::createFromInt(1),1);
}
|
309
|
How can I assign a radio button to a cell
![](images/exgridq309.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.MarkSearchColumn(false);
exgrid1.SelBackColor(WinApi::RGB2int(255,255,128));
exgrid1.SelForeColor(WinApi::RGB2int(0,0,0));
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
exgrid1.Columns().Add("C3");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Radio 1");
com_Items.CellHasRadioButton(h,COMVariant::createFromInt(1),true);
com_Items.CellRadioGroup(h,COMVariant::createFromInt(1),1234);
com_Items.CellValue(h,COMVariant::createFromInt(2),"Radio 2");
com_Items.CellHasRadioButton(h,COMVariant::createFromInt(2),true);
com_Items.CellRadioGroup(h,COMVariant::createFromInt(2),1234);
com_Items.CellState(h,COMVariant::createFromInt(1),1);
}
|
308
|
How can I change the state of a checkbox
![](images/exgridq308.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Check Box");
com_Items.CellHasCheckBox(h,COMVariant::createFromInt(1),true);
com_Items.CellState(h,COMVariant::createFromInt(1),1);
}
|
307
|
How can I assign a checkbox to a cell
![](images/exgridq307.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Check Box");
com_Items.CellHasCheckBox(h,COMVariant::createFromInt(1),true);
}
|
306
|
How can I display an item or a cell on multiple lines
![](images/exgridq306.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.ScrollBySingleLine(true);
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"This is bit of text that's shown on multiple lines");
com_Items.CellSingleLine(h,COMVariant::createFromInt(1),false);
}
|
305
|
How can I assign a tooltip to a cell
![](images/exgridq305.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"tooltip");
com_Items.CellToolTip(h,COMVariant::createFromInt(1),"This is bit of text that's shown when the user hovers the cell");
}
|
304
|
How can I associate an extra data to a cell
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2");
com_Items.CellData(h,COMVariant::createFromInt(1),"your extra data");
}
|
303
|
How do I enable or disable a cell
![](images/exgridq303.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2");
com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 3");
com_Items.CellEnabled(h,COMVariant::createFromInt(1),false);
}
|
302
|
How do I change the cell's foreground color
![](images/exgridq302.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2");
com_Items.CellForeColor(h,COMVariant::createFromInt(1),WinApi::RGB2int(255,0,0));
}
|
301
|
How do I change the visual effect for the cell, using your EBN files
![](images/exgridq301.png)
public void init()
{
COM com_Items;
anytype var_Items;
int h;
;
super();
exgrid1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn");
exgrid1.Columns().Add("C1");
exgrid1.Columns().Add("C2");
var_Items = exgrid1.Items(); com_Items = var_Items;
h = com_Items.AddItem("Cell 1");
com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 2");
com_Items.CellBackColor(h,COMVariant::createFromInt(1),0x1000000);
}
|